ios (C++)

ios is a header file in the C++ standard library which defines several types and functions basic to the operation of iostreams. This header is typically included automatically by other iostream headers. Programmers rarely include it directly.[1]

Contents

Members

Typedefs

Name description
ios Supports the ios class from the old iostream library.
streamoff Supports internal operations.
streampos Holds the current position of the buffer pointer or file pointer.
streamsize Specifies the size of the stream.
wios Supports the wios class from the old iostream library.
wstreampos Holds the current position of the buffer pointer or file pointer.

Manipulators [2]

Name description
boolalpha Specifies that variables of type bool appear as true or false in the stream.
dec Specifies that integer variables appear in base 10 notation.
fixed Specifies that a floating-point number is displayed in fixed-decimal notation.
hex Specifies that integer variables appear in base 16 notation.
internal Causes a number's sign to be left justified and the number to be right justified.
left Causes text that is not as wide as the output width to appear in the stream flush with the left margin.
noboolalpha Specifies that variables of type bool appear as 1 or 0 in the stream.
noshowbase Turns off indicating the notational base in which a number is displayed.
noshowpoint Displays only the whole-number part of floating-point numbers whose fractional part is zero.
noshowpos Causes positive numbers to not be explicitly signed.
noskipws Cause spaces to be read by the input stream.
nounitbuf Causes output to be buffered and processed when the buffer is full.
nouppercase Specifies that hexadecimal digits and the exponent in scientific notation appear in lowercase.
oct Specifies that integer variables appear in base 8 notation.
right Causes text that is not as wide as the output width to appear in the stream flush with the right margin.
scientific Causes floating point numbers to be displayed using scientific notation.
showbase Indicates the notational base in which a number is displayed.
showpoint Displays the whole-number part of a floating-point number and digits to the right of the decimal point even when the fractional part is zero.
showpos Causes positive numbers to be explicitly signed.
skipws Cause spaces to not be read by the input stream.
unitbuf Causes output to be processed when the buffer is not empty.
uppercase Specifies that hexadecimal digits and the exponent in scientific notation appear in uppercase.

Classes

Name description
basic_ios The template class describes the storage and member functions common to both input streams (of template class basic_istream) and output streams (of template class basic_ostream) that depend on the template parameters.
fpos The template class describes an object that can store all the information needed to restore an arbitrary file-position indicator within any stream.
ios_base The class describes the storage and member functions common to both input and output streams that do not depend on the template parameters.

References

  1. ^ "<ios> Visual Studio 2010". Microsoft MSDN: Visual Studio 2010. http://msdn.microsoft.com/en-us/library/5yc0df6d.aspx. Retrieved 2011-09-28. 
  2. ^ Stanley B. Lippman, Josee Lajoie (1999 - third edition). C++ Primer. Massachusetts: Addison-Wesley. pp. 1112–1120. ISBN 0-201-82470-1. 

External links